home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / strlibs.zip / STRNEND.C < prev    next >
Text File  |  1993-01-04  |  577b  |  22 lines

  1.  
  2. /*  File   : strnend.c
  3.     Author : Richard A. O'Keefe.
  4.     Updated: 1 June 1984
  5.     Defines: strnend()
  6.  
  7.     strnend(src, len)
  8.     returns a pointer to just after the end of the string src, which is
  9.     terminated by a NUL character, or by exhaustion of the length bound
  10.     len.  That is, strnend(s,L)-s = strnlen(s,L).  s+strnlen(s,L) could
  11.     of course be used instead, but this is sometimes clearer.
  12. */
  13.  
  14. char *strnend(src, len)
  15.     register char *src;
  16.     register int len;
  17.     {
  18.         while (--len >= 0 && *src) src++;
  19.         return src;
  20.     }
  21.  
  22.